<?php
namespace app\mouth\controller;
use app\mouth\common\Api;
use think\facade\Request;
use app\mouth\model\PageModel;
use think\Controller;

/**
 * 杂项
 * Class PageApi
 * @package app\mouth\controller
 */
class PageApi extends Controller{
    /**搜索
     * @return \think\response\Json
     */
    public function search(){
        $search = Request::get('inputVal');
        if ($search) {
            $searchadd = (new PageModel)->search($search);
            return  json(['code' => 40006, 'msg' => '成功','data'=>$searchadd]);
        }
        return  json(['code' => 40003, 'msg' => '请输入值','data'=>[]]);
    }

    public function admin(){
        $a = 1;
        if ($a == 2) echo '2';

    }
}